package com.lanou3g.ptp.teachlink.service;


import com.github.pagehelper.PageInfo;
import com.lanou3g.ptp.entity.Teachlink;
import com.lanou3g.ptp.exception.PtpException;
import com.lanou3g.ptp.vo.TeachLinkParams;
import com.lanou3g.ptp.vo.TeachlinkVO;

import java.util.List;

public interface TeachlinkService {
    //查找所有教学环节
    PageInfo<Teachlink> findAll(Integer page, Integer size);
    //模糊查询
    PageInfo<Teachlink> findByKeyword(Integer page, Integer size, String keyword);
    //通过ID查询
    Teachlink findById(Long id);
    //新增教学环节
    boolean insert(Long teacherId, TeachlinkVO teachlink) throws PtpException;

    void updateVO(Long teacherId, TeachlinkVO teachlink) throws PtpException;
    //修改
    boolean updateById(Teachlink teachlink);
    //删除
    boolean deleteById(Long id);
    //批量删除
    boolean deleteByIds(Long[] ids);

    /**
     * 多条件查询
     * @author 武奇
     * @param condition
     * @return
     */
    PageInfo<Teachlink> findByCondition(TeachLinkParams condition);

    List<Teachlink> findByClazzId(Long clazzId);

    TeachlinkVO findBodyById(Long teachlinkId);
}
